import java.util.Scanner;

public class Test {
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入一个较大的数");
        int a = scan.nextInt();
        System.out.println("请输入一个较小的数");
        int b = scan.nextInt();
        func(a,b);
    }
    public static void func(int a,int b){
        while(a%b != 0){
            int c = a%b;
            a = b;
            b = c;
        }
        System.out.println("最大公约数为"+b);
    }

    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
       if(scan.hasNext()){
            int n = scan.nextInt();
            //每一行
            for (int i = 0; i < n ; i++) {
                //每行当中的每列
                for (int j = 0; j < n; j++) {
                    if(i == j||i+j ==n-2){
                        System.out.print("*");
                    }else{
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }

    public static void main3(String[] args) {

        for (int j = 2; j<=100 ;j++) {
            int i;
            for (i = 2;i <= Math.sqrt(j);i++) {
                if(j%i == 0) {
                    //System.out.println("n不是素数："+n);
                    break;
                }
            }
            if(i > Math.sqrt(j)) {
                System.out.println(j + "是素数");
            }
        }
    }
    public static void main4(String[] args) {
        //外层生成被除数
        for (int i = 2; i < 100; i++) {
            boolean flg = false;
            //内层生成除数
            for (int j = 2; j < i/2; j++) {//j不能等于1，等于1的话，每进来一个数i%1 都等于0
                if(i%j == 0){
                    flg = true;
                    break;//跳出内层循环
                }
            }
            if(flg == false){
                System.out.print(i+" ");
            }
        }
    }

    public static void main5(String[] args) {
        int count = 0;
        for (int i = 0; i < 100; i++) {
            if(i%10 == 9){//判断个位是否为9
                count ++;
            }
            if(i/10 == 9){//判断十位是否为9
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        int b = scan.nextInt();
        int i;
        for (i = 2; i < b; i++) {
            if(b/i != 0){
                System.out.println(b+"不是素数");
                break;
            }
        }
        if(i>b) {
            System.out.println(b + "是素数");
        }
    }
    public static void main7(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        int count = 0;
        while(num!=0){
            if((num&1) == 1){
                count++;
            }
            num = num>>>1;//表示向右移动一位，左边补0
        }
        System.out.println(count);
    }

    public static void main8(String[] args) {
//        int[] a = {1,2,3,4,5};
//        int[] b = new int[5];
//        for (int i = 0; i < b.length; i++) {
//            b[i] = i;
//        }
//        for (int x:b) {
//            System.out.print(x+" ");
//        }
        int[] javaScore={12,23,45,56,25,36,48,59,78,56};
         func(javaScore);

    }
    public static void func(int[] array){
        for (int i = 0; i < array.length; i++) {
            boolean flag = true;
            for (int j = 1; j < array.length-i-1; j++) {
                if(array[j]>array[j+1]){
                    int tmp = array[j];
                    array[j]=array[j+1];
                    array[j+1]=tmp;
                    flag = false;
                }
            }
            if(flag == true){
                break;
            }
        }
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
    }

    public static void main9(String[] args) {
        int[][] array = {{1,2},{3,4},{4,5,6}};
        System.out.println(array.length);
        for (int i = 0; i < array.length; i++) {
            System.out.println("第"+(i+1)+"行有"+array[i].length+"个元素");
        }
    }

    public static void main77(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        while(num/10 != 0){
            System.out.print(num%10+" ");
            num = num/10;
        }
       System.out.println(num);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int no = scan.nextInt();
        for (int i = 0; i < 3; i++) {
            if(no == 123456){
                System.out.println("恭喜你，登录成功！！！");
            }
            System.out.println("登录失败，请重新输入，密码");
        }
    }
}
